﻿<sdk:Page
x:Class="MedLink2011.Views.Patients.Pages.AppointmentsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="Appointment"
Background="AliceBlue"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
xmlns:navCtl="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" 
xmlns:viewModels="clr-namespace:MedLink2011.Views.Patients.Pages" 
xmlns:appControls="clr-namespace:MedLink2011.Controls" xmlns:ViewModels="clr-namespace:MedLink2011.Views.Patients.ViewModels">
    <navCtl:Page.Resources>
        <ViewModels:AppointmentViewModel x:Key="AppointmentViewModel" ></ViewModels:AppointmentViewModel>
    </navCtl:Page.Resources>
    <appControls:BusyIndicator x:Name="BusyIndicator" DataContext="{Binding Source={StaticResource AppointmentViewModel}}" Foreground="SlateGray" IsBusy="{Binding IsBusy}">
        <Grid x:Name="LayoutRoot" DataContext="{Binding Source={StaticResource AppointmentViewModel}}" Background="WhiteSmoke">
            <Border BorderBrush="#FF505050"  BorderThickness="2"  CornerRadius="20">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#ED71A5D8" Offset="0.8" />
                        <GradientStop Color="AliceBlue" Offset="1.09" />
                    </LinearGradientBrush>
                </Border.Background>
                <ScrollViewer x:Name="scrollViewerAppointments" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" >
                    <Grid HorizontalAlignment="Left" x:Name="AppointmentsGrid" VerticalAlignment="Top">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="25" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="30" />
                            <RowDefinition Height="25" />
                            <RowDefinition Height="25" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="30" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Button Grid.Column="0" Grid.Row="9" Style="{StaticResource GreenButton}" x:Name="printButton" Content="Print" Background="Blue" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding PrintAppointmentCommand}" />
                        <Button Grid.Column="1" Grid.Row="9" Style="{StaticResource OrangeButton}" x:Name="addButton" Content="Add" Background="Green" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding AddNewAppointmentCommand}" />
                        <Button Grid.Column="3" Grid.Row="9" Style="{StaticResource BlueButton}" x:Name="saveButton" Content="Save" Background="Blue" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding SaveAppointmentCommand}" />
                        <Button Grid.Column="4" Grid.Row="9" Style="{StaticResource YellowButton}" x:Name="deleteButton" Content="Delete" Background="Blue" Width="75" Height="23" HorizontalAlignment="Right" Command="{Binding DeleteAppointmentCommand}" />
                        <TextBlock ToolTipService.ToolTip="Apointment Id" ToolTipService.Placement="Right" Text="Apointment Id:" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <TextBlock Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="0" x:Name="Apointment_idTextBox" Text="{Binding CurrentAppointment.Apointment_id, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" />
                        <TextBlock ToolTipService.ToolTip="Appointment Date" ToolTipService.Placement="Right" Text="Appointment Date:" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <sdk:DatePicker Grid.Column="4" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="0" x:Name="Appointment_DateDatePicker" SelectedDate="{Binding CurrentAppointment.Appointment_Date, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
                        <TextBlock ToolTipService.ToolTip="Comments" ToolTipService.Placement="Right" Text="Comments:" Grid.Column="0" Grid.Row="2" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <TextBox Grid.Column="1" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="2" x:Name="CommentsTextBox" Text="{Binding CurrentAppointment.Comments, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="1000"/>
                        <TextBlock ToolTipService.ToolTip="Appointment Validity Date" ToolTipService.Placement="Right" Text="Appointment Validity Date:" Grid.Column="3" Grid.Row="2" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <sdk:DatePicker Grid.Column="4" Grid.Row="2" Height="23" HorizontalAlignment="Left" Margin="0" x:Name="Appointment_Validity_DateDatePicker" SelectedDate="{Binding CurrentAppointment.Appointment_Validity_Date, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left" />
                        <TextBlock ToolTipService.ToolTip="Validity Status" ToolTipService.Placement="Right" Text="Validity Status:" Grid.Column="0" Grid.Row="3" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <TextBox Grid.Column="1" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="2" x:Name="Validity_StatusTextBox" Text="{Binding CurrentAppointment.Validity_Status, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="16"/>
                        <TextBlock ToolTipService.ToolTip="Urgency" ToolTipService.Placement="Right" Text="Urgency:" Grid.Column="3" Grid.Row="3" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <TextBox Grid.Column="4" Grid.Row="3" Height="23" HorizontalAlignment="Left" Margin="2" x:Name="UrgencyTextBox" Text="{Binding CurrentAppointment.Urgency, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  MaxLength="16"/>
                        <TextBlock ToolTipService.ToolTip="Description" ToolTipService.Placement="Right" Text="Description:" Grid.Column="0" Grid.Row="4" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <TextBox Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="2" x:Name="DescriptionTextBox" Text="{Binding CurrentAppointment.Description, Mode=TwoWay, NotifyOnValidationError=true, ValidatesOnExceptions=true, TargetNullValue=''}" VerticalAlignment="Center" Width="120" HorizontalContentAlignment="Left"  Background="#FFFFFFDC"  MaxLength="64"/>
                        <TextBlock ToolTipService.ToolTip="Patient Id" ToolTipService.Placement="Right" Text="Patient Id:" Grid.Column="3" Grid.Row="4" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <ComboBox Grid.Column="4" Grid.Row="4" ItemsSource="{Binding PatientCollection, Mode=TwoWay}" DisplayMemberPath = "First_Name" SelectedItem="{Binding SelectedPatient, Mode=TwoWay}" x:Name="Patient_IdComboBox"  VerticalAlignment="Top" Width="150" Background="Orange" Foreground="Black" Margin="3,0,0,0">
                            <ComboBox.BorderBrush>
                                <SolidColorBrush Color="GreenYellow"/>
                            </ComboBox.BorderBrush>
                        </ComboBox>
                        <TextBlock ToolTipService.ToolTip="Doctor Id" ToolTipService.Placement="Right" Text="Doctor Id:" Grid.Column="0" Grid.Row="5" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Center" Foreground="#FF7635FC" FontWeight="Bold"  Width="180" TextWrapping="Wrap" FontFamily="Portable User Interface" FontSize="11" TextTrimming="WordEllipsis" />
                        <ComboBox Grid.Column="1" Grid.Row="5" ItemsSource="{Binding DoctorCollection, Mode=TwoWay}" DisplayMemberPath = "First_Name" SelectedItem="{Binding SelectedDoctor, Mode=TwoWay}" x:Name="Doctor_IdComboBox"  VerticalAlignment="Top" Width="150" Background="Orange" Foreground="Black" Margin="3,0,0,0">
                            <ComboBox.BorderBrush>
                                <SolidColorBrush Color="GreenYellow"/>
                            </ComboBox.BorderBrush>
                        </ComboBox>
                    </Grid>
                </ScrollViewer>
            </Border>
        </Grid>
    </appControls:BusyIndicator>
</sdk:Page>